package jee.boot.entity.activiti;

import jee.boot.common.annotation.Column;
import jee.boot.common.annotation.Table;

import java.util.Date;

/**
 * 历史节点表（act_hi_actinst）
 * 历史活动信息。这里记录流程流转过的所有节点，与HI_TASKINST不同的是，taskinst只记录usertask内容
 */
@Table(name = "act_hi_actinst")
public class ActActInst extends ActDataEntity<ActActInst> {
    private static final long serialVersionUID = 1L;
    /**
     * 流程定义ID
     */
    @Column(name = "PROC_DEF_ID_",data = {"procDef.id","procDef.name","procDef.key","procDef.category","procDef.","procDef.version","procDef.resourceName","procDef.description"})
    private ActProcDef procDef;
    /**
     * 流程实例ID
     */
    @Column(name = "PROC_INST_ID_",data = {"procInst.id","procInst.businessKey"})
    private ActHisProcinst procInst;
    /**
     * 执行实例ID
     */
    @Column(name = "EXECUTION_ID_")
    private ActExecution execution;
    /**
     * 节点定义ID
     */
    @Column(name = "ACT_ID_")
    private String actId;
    /**
     * 任务实例ID 任务实例ID 其他节点类型实例ID在这里为空
     */
    @Column(name = "TASK_ID_")
    private String task;
    /**
     * 调用外部的流程实例ID 调用外部流程的流程实例ID’
     */
    @Column(name = "CALL_PROC_INST_ID_")
    private String callProcInst;
    /**
     *节点名称	节点定义名称
     */
    @Column(name = "ACT_NAME_")
    private String actName;
    /**
     *节点类型 如startEvent、userTask
     */
    @Column(name = "ACT_TYPE_")
    private String actType;
    /**
     *节点签收人
     */
    @Column(name = "ASSIGNEE_")
    private String assignee;
    /**
     *开始时间
     */
    @Column(name = "START_TIME_")
    private Date startTime;
    /**
     *结束时间
     */
    @Column(name = "END_TIME_")
    private Date endTime;
    /**
     * 耗时	毫秒值
     */
    @Column(name = "DURATION_")
    private long duration;
    /**
     * 历史审批意见
     */
    @Column(name = "TASK_ID_",key = "TASK_ID_",data = {"comment.id","comment.message"},extraConditions = {"comment.TYPE_ = 'comment'"})
    private ActHisComment comment;

    public ActActInst() {
    }

    public ActActInst(String id) {
        super(id);
    }

    public ActProcDef getProcDef() {
        return procDef;
    }

    public void setProcDef(ActProcDef procDef) {
        this.procDef = procDef;
    }

    public ActHisProcinst getProcInst() {
        return procInst;
    }

    public void setProcInst(ActHisProcinst procInst) {
        this.procInst = procInst;
    }

    public ActExecution getExecution() {
        return execution;
    }

    public void setExecution(ActExecution execution) {
        this.execution = execution;
    }

    public String getActId() {
        return actId;
    }

    public void setActId(String actId) {
        this.actId = actId;
    }

    public String getTask() {
        return task;
    }

    public void setTask(String task) {
        this.task = task;
    }

    public String getCallProcInst() {
        return callProcInst;
    }

    public void setCallProcInst(String callProcInst) {
        this.callProcInst = callProcInst;
    }

    public String getActName() {
        return actName;
    }

    public void setActName(String actName) {
        this.actName = actName;
    }

    public String getActType() {
        return actType;
    }

    public void setActType(String actType) {
        this.actType = actType;
    }

    public String getAssignee() {
        return assignee;
    }

    public void setAssignee(String assignee) {
        this.assignee = assignee;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public long getDuration() {
        return duration;
    }

    public void setDuration(long duration) {
        this.duration = duration;
    }

    public ActHisComment getComment() {
        return comment;
    }

    public void setComment(ActHisComment comment) {
        this.comment = comment;
    }

    public static void main(String[] args) {
        System.out.println(new ActActInst().getFindListSql());
    }
}
